<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: id
  Date: 2020/12/31
  Time: 14:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page  isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../util/makerAndenterGoodAndselect1.jsp"%>

<style type="text/css">



</style>
<html>
<head>
    <title>ADD EnterGood</title>
    <style type="text/css">
        #add{
            width: 1288px;
            height:1000px;
            position: absolute;
            top: 60px;
            left: 83px;
        }

        .fr{
            width: 400px;
            height: 300px;
            position: relative;
            left: 480px;
            top: 50px;
        }
        span{
            color: cadetblue;
        }
        input{
            text-align: center;
        }
    </style>
    <script type="text/javascript" src="../../../static/jquery-3.4.1.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#add").hover(function () {
                    $("#d3").hide()
                    $("#xs").hide()
                    $("#d2").hide()
                    $("#d4").hide()
                }
            )



            /*效验*/
            var fl=true;

            var val=$("#da1").val();
            if(val==null || val==""){
                $("#ds2").html("×")
                fl=false;
            }else {
                $("#ds2").html("")
                fl=true;
            }

            $("#da1").blur(function () {
                if($("#da1").val()==null||$("#da1").val()==""){
                    $("#ds1").html("请填写日期!")
                    fl=false;
                }else {
                    $("#ds1").html("√")
                    $("#ds2").html("")
                    fl=true;
                }
            })

            /*表单验证*/
            $("Form").submit(function () {
                return fl;
            })

        })





    </script>
</head>
<body>

<h1>${msg}</h1>
<div id="add">
    <div class="fr">
        <form action="${pageContext.request.contextPath}/EnterGood/addEnterGood2">
            <span>商品类型:</span>
            <select name="goodStyle" style="width: 170px;height: 30px;border-radius: 6px" id="da2">
            <c:forEach items="${goodStyleList}" var="a">
               <option value="${a.gId}">${a.gName}</option>
            </c:forEach>
            </select><br><br>
          <span> 业务日期:</span> <input type="date" name="data1" style="width: 170px;height: 30px;border-radius: 6px" id="da1">
            <span id="ds1" style="color: red"></span>
            <span id="ds2" style="color: palegoldenrod"></span>


            <br><br>
            <span>供应商:</span>&nbsp;&nbsp;&nbsp;
            <select name="forname" style="width: 170px;height: 30px;border-radius: 6px">
                <c:forEach var="b" items="${suppList}">
                    <option value="${b.sid}">${b.content}</option>
                </c:forEach>
            </select><br><br>

            <span>入仓之库:</span>
            <select name="rid" style="width: 170px;height: 30px;border-radius: 6px">
                <c:forEach var="c" items="${reList}">
                    <option value="${c.rid}">${c.rName}</option>
                </c:forEach>
            </select><br><br>
            <span>选择门店:</span>
            <select name="stores" style="width: 170px;height: 30px;border-radius: 6px">
                <c:forEach var="d" items="${storesList}">
                    <option value="${d.id}">${d.sname}</option>
                </c:forEach>
            </select><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="submit" value="Add to" style="width: 170px;height: 30px;border-radius: 6px">
        </form>
    </div>
</div>


</body>
</html>
